package dao;

import java.util.HashMap;

/**
 * Interface UserDao
 * 
 * Class using this interface must implement the methods in this interface. This
 * class contains methods to perform dao operations
 * @author Sukhjinder 
 * @since May 2013
 * @version $Revision: 1.0 $
 */
public interface UserDao {
	
	/**
	 * create a new user and return its id
	 * @param properties
	
	
	 * @return int id * @throws DaoException */
	public int create(HashMap<String, String> properties) throws DaoException;
	
	/**
	 * update the user
	 * @param properties
	
	 * @throws DaoException */
	public void update(HashMap<String, String> properties) throws DaoException;
	
	/**
	 * delete the user
	 * @param Id
	
	 * @throws DaoException */
	public void delete(int Id) throws DaoException;
	
	/**
	 * find the user by its id
	 * @param Id
	
	
	 * @return hashmap of user properties * @throws DaoException */
	public HashMap<String, String> findById(int Id) throws DaoException;
	
	/**
	 * find the user by its name
	 * @param Name
	
	
	 * @return HashMap<String,String>
	 * @throws DaoException */
	public HashMap<String, String> findByName(String Name) throws DaoException;
			    	   
}
